<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>05.lodash的使用.html</title>
</head>

<body>
    <button id="btnNode01">防抖函数</button>
    <button id="btnNode02">节流函数</button>
    <script src="./js/lodash.min.js"></script>
    <script>
        const obj = {
            uname: 'blue',
            age: 18,
            hobby: ['乒乓球', '足球'],
            family: {
                baby: '小blue'
            }
        }
         console.dir(_);
        // _.c
        const newObj = _.cloneDeep(obj)
        console.log(obj);
        console.log(newObj);
        
        // 防抖
        btnNode01.onclick =  _.debounce(function(e){
                console.log("#####",e);

            },1000)
         // 节流
            btnNode02.onclick = _.throttle(function(e){
                console.log("@@@@",e);
            },5000)
        
    </script>

</body>

</html>